Web Services Performance

HPhamHPham ✭✭USMember ✭✭

Hello, I'm developed the Point of Sales (POS) application in Windows and iPad (iOS devices) app using local database such as MSSQL Server Express and Sqlite3. These applications work great and FAST in local network environment. For multi stations I used MSSSQL network server (TCP open port 1433). For SQLite system, I've wrote a complete WCF server/client then hosted on local network. Again, the systems work great and FAST. Now I want explore Web base application which mean that I must hosting web services on the WWW or Cloud services.

So, my question is what web service protocol should I use to maintaining the satisfactory POS performance (the applications still have run locally as native app). I have looks in to JSON, REST protocol but not sure will give the performance that I need because in POS world it is requires that fast and a lot database records to SELECT(GET), UPDATE(POST) and INSERT(PUT) in real-time or close manner.

I know that I can't get a real-time performance using web services but if I can get 80% plus performance that worth shooting for. Thanks...

Visit our website: ht<tp://www.yesmua.com

Posts

  • WhitneyLandWhitneyLand USMember

    Hi HocPham,

    I see two basic approaches to your performance goals:

    1) Stick with REST/JSON, but try to minimize data size and/or number of service calls needed depending on what your bottleneck is. For example, could multiple calls be merged into one to save on total network round trips?

    2) If you really need low latency, look into web sockets. They work over port 80 but can be very fast - they use TCP without HTTP overhead (http://en.wikipedia.org/wiki/WebSocket). There are libraries to help with this.

    3) If possible try not to use SOAP and XML, which may work against your throughput and latency goals.

    Regards,
    Lee

  • SKallSKall ✭✭✭✭ USMember ✭✭✭✭

    Using binary serializer like ProtoBuf will help a lot with data size in comparison to JSON. Build your service with a ServiceStack and you'll get XML, CSV, JSON etc out of the box. Adding protobuf is a simple plugin to add, both on the server and client side. Then you have the flexibility to decide even on runtime which serialization schema to call.

    ServiceStack might not have ProtoBuf plugin for iPhone and Android but they are extremely easy to build.

  • HPhamHPham ✭✭ USMember ✭✭

    Thanks you guys, your info is very helpfull...

  • HPhamHPham ✭✭ USMember ✭✭

    Ok, this question about database structures. If I have hundreds of clients how do I partition the database? all in one database server (file) or each client a database file. Database performance?

Sign In or Register to comment.