Link to home
Start Free TrialLog in
Avatar of Ria jain
Ria jain

asked on

Suggest Cloud Print Technology and Architecture ?

Hi,

I wanted to develop print solution for my web app : Web app to Desktop print appl using microsoft stack.

when someone press print button on web app, web app may send something like push notification as COMMAND to desktop application (User specific) and upon receipt of command Desktop print app can print the documents. If case of failure Desktop Print Application can send back information to web app about print failure.

To send push notification from web app to Desktop app,
can i use SignalR for sending user specific push notification ?

Please suggest :

1.Am i going in right direction.Whether the industry standards use same process like Google Print or PrintNode.

If not what technology/Process i can use for such application.
Initialy developing for one customer but need for multiple users.

regards,
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Hi Ria,

Push notifications are traditionally considered Mobile only.

In your case, anything that can be used to convey message from a server to client can be utilized. If you want to use SignalR then yes it can be used as well. Please check: https://docs.microsoft.com/en-us/aspnet/signalr/overview/guide-to-the-api/hubs-api-guide-net-client

I think your client can be a Windows Service or a WPF app - or a combination of both i.e. your WPF App provides a UI so that end user can connect to your server, provide credentials, configure and manage other devices(these are couple of ideas - it is only limited by your imagination and resources, of course) and Windows Service will listen for commands coming from your Web server and execute them, provide error feedback and so on.

Your idea is similar to any of the Cloud Print tech and I think you could use raw WebRTC (SignalR is a wrapper on top of WebRTC) protocol but then it depends on your preparation of how much complexity you want to handle in your solution. SignalR hides most of these complexities so you can really focus on the business problem at hand.

I made a SignalR solution prototype couple of years back and it was a great showcase in terms of what SignalR can do but it was limited to ASP.Net only. I was very much skeptical but it never gave me any issues (had 10+ concurrent users logged in) during prototype demo and runs. You would want to determine how many users will be using your server and then prepare accordingly to scale SignalR as it does not scale on its own. As a developer you must take care of it yourself. Please refer to scaling strategies for SignalR for more details at: https://docs.microsoft.com/en-us/aspnet/signalr/overview/performance/scaleout-in-signalr.

Regards,
Chinmay.
Avatar of Ria jain
Ria jain

ASKER

Hi,

please suggest other Technology stack/(Open Source) as well as non microsoft.

I really want to make scalable system which can be extended to more users in future.

Really interested in knowing what kind of stack and architecture Google Cloud Print or PrintNode.com use.

regards
ASKER CERTIFIED SOLUTION
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Current Requirement :

Number of  users : 100
Approximate concurrent users : Approx 100 users active
Approximate number of commands issued in an hour : One user can issue 1 print command per minute during peak time.

100 print command per minute   (As number of users 100)
Success/Faliure Response for each command from proxy system

So 200 to and from command/response per minute.
Type of file to be printed : Pdf
Size of file to be printed approx : 60Kb approx with 2 page documents (In worst case can be 5-10 mb for many pages).

Data Size per minute :100users x 60kb = 6mb  (60kb x 100 commands) to 50mb (5mb x 100 commands) per minute

Current Server :
---------------------
Server : Windows 2012R2

Processor : Intel® Quad-Core
Speed      : 4 Cores x 3.1 GHz(3.4 GHz Turbo Boost)
RAM      :12 GBDDR3 ECC
Hard-disk space      :1,000 GB (2 x 1,000 GB SATA)
RAID      :Software RAID 1
Bandwidth transfer      
Unlimited transfer
IP address      :Own static IP adress
Port speed      :100 Mbit/s


Scalability :
-------------------
Timeframe = 1 year
User Growth = 10 times of current user count , say 1000 users

Print Commands per minute = 1000 to 2000 per minute .

Data Print size per command : will remain same : 60kb per doc to 5 mb per doc

Total Data size of all documents for all 1000 users : 60 mb to 500mb

Not accounted exponential user growth here.
Hi Ria,

Relatively this is a small user base(I was thinking in thousands concurrent users), to begin with if you have 100 active users i don't see a challenge in any of the technology stack that we have discussed so far given the implementation is done properly.

For Node, you can add number of Node.js instance and put them all behind a load balancer/Reverse Proxy like NGINX(There are other benefits of this as well) and you are good to go. Keep these Node.js instances on separate physical servers(i.e. suppose on your Physical server P1 there are 3 VM - VM1, VM2 and VM3 and another Physical server P2 you have 3 VM - VM4, VM5 and VM6) make sure that you keep at least 2 Node.js instances and each of them should be hosted on either VM1,VM and VM3 and VM4,VM5 and VM6.

For Node.js I do not have much insight and you should do more research if you are going to this direction.

For SignalR, please refer to: https://docs.microsoft.com/en-us/aspnet/signalr/overview/performance/signalr-performance

To scale with SignalR, refer to: https://docs.microsoft.com/en-us/aspnet/signalr/overview/performance/scaleout-in-signalr

In my experience, I think you should go with Redis Cache.

Another idea - and this must be verified with your dev team is to transmit print file separately so that your actual command that is transmitted from the server would be something like this:
Printjob.Id ="xyz"
PrintJob.Command="Print"
PrintJob.Options="A4Page,AllPages"
PrintJob.TargetPrinter="HomePrinter"
PrintJob.PrintFileID ="abcdefg";
...

Open in new window

Now, the client component will download the file(it could be a simple HttpWebRequest) keeping your Command/Control Server free from the load of these file handling which I believe can be a huge bottleneck. You have to transfer the file from Mobile device to your server but that is not a challenge and simple file upload will take care of it.

Your Server specs are decent but couple of observations w.r.t 100 concurrent users(I don't think the concurrency is 100%, generally it can be any where between 10 to 25% but I am taking your word for it and calculating accordingly)
1. RAM can be increased, RAM is VERY CHEAP nowadays, even if it is VRAM, you can go for a better version
2. Why 100Mbit connection? Gigabit is a norm now. And for HA scenarios, there has to be more than 1 connection
3. Your RPS - Request Per Second number also seems bit off the chart, I strongly recommend doing a PoC with 10 users who mimic the real user's behavior and derive your RPS and then tweak your hardware sizing.

There are lot of factors to consider as well, detailed system specs and a PoC will do wonders for your requirements.

Regards,
Chinmay.
Thanks i appreciate your help.................

Decided to work on POC based on your suggestions.....and test. Will keep you posted once we are done with solution.

regards
Thank you Ria. All the best to you and your team and I look forward to hear your progress and feel free in case you run into any issues.
Hi Ria,

World of tech changes at a really really fasted paced.I hope you still remember how I was concerned about scaling using SignalR backplane, there is an amazing news on that front.

Please check: Azure SignalR Service. If you ask me the pricing is fairly competitive and I don't think during development or even after launch you need to worry about running a higher bill. If you can calculate your messages / per hour you can get a pretty accurate pricing from the Pricing calculator.

I strongly recommend going with it if your project requirement(business, technical and financial) are met with this service.

Regards,
Chinmay.