What's next

Dec 16, 2012 at 8:11 AM

Greetings, my fellow developers and followers of this project!
I've been quiet for a few months, no source updates or any news. I apologize for such a long silence. No, the project is not abandoned, it is in active development. I was busy adding new features requested by the application  which is currently the main consumer of the technology (more accurately this is a whole set of applications). Adding new features in a rush mode does not always result in nice, clean and well structured code; right the case here, and honestly I would be embarrassed to publish these clumsy first drafts. So I decided to suspend pushing to codeplex until I can do some cleanup. I also wanted to update documentation, so there's no mismatch. It took longer than I expected (as usual), but soon comes the time to share something. 

Here's what's going on. 

The initial stabilization period for the app is over, we successfully went live (for our customers only, the app is not visible to the public). The app is quite sophisticated - not a monster like an ERP system, but definitely not trivial. It includes the app server in the cloud; two server databases totalling around 70 tables; set of RESTfull web services; client-side app with local SQL CE database and automatic sync with the server; finally, a Web management app built on ASP.NET MVC 4. All components use VITA framework for data access. Database schema management is done completely through VITA's automatic schema update facilities. We push c# code from dev to staging to production, and schema follows. Magic!

VITA's core code is stabilized, the clean up and refactoring process is on the way. No new features, just cleanup. While I'm doing this, I'm  starting to write/publish the documentation - expect new pages come within two weeks. Then, once the code is ready, I'll push it. Just like last time. 

Here is a brief overview of the new functionality - just to give you a taste of what's coming:

 1. Authorization framework. This is probably the biggest breakthrough, and something that will distinguish VITA from other frameworks - none of them, as far as I know, offer anything like this. You can define user roles as composition of permissions on entity types, specific entities and even specific properties (read/write). It implements what is known as row-level authorization, so you can specify rules like 'user can edit his purchase orders, view other orders from his department, and cannot see any other orders'. Once the roles are defined, and the system is given the list of current user's roles, it starts watching all activity by the user, and throws 'AccessDenied' on any attempt to access the data that is not granted by user roles. The application code simply implements the business logic without worrying about user permissions, and the authorization system automatically detects any violation, by error or by malicious attack.

2. Data cache. Full-blown, functionally complete caching implementation. You can specify a set of entity types (tables) to be kept in memory cache, and then all requests to these entity types are satisfied from cache. This includes not only get-by-Id requests (like in most other cache solutions), but also ANY dynamic LINQ query, like 'from bk in books where bk.Publisher.Name = "ABC" select bk'. The dynamic query is rewritten on the fly (and cached, see next paragraph) to run against IEnumerable entity lists in cache. And then executed in cache. Instead of typical 5-10 ms, the execution is instantenuous, most often under 1 ms. 

3. LINQ queries caching. Dynamic LINQ queries are compiled and cached automatically, so if the query (maybe with different parameters) is executed again, the system runs previously compiled query, avoiding the overhead of SQL translation. This also covers the queries against entities in data cache: the query is rewritten to run against in-memory lists, compiled and saved in compiled query cache. 

4. A number of interesting facilities are started as standard modules in Vita.Modules assembly. I wrote 'started', because their implementation is far from complete (feature-wise), but they are already usable, even in rudimentary form as they are now. They are actually used by our application. Among these: 

a. Login module - with login/password hashing using RFC 2898, as recommended by all security experts. 

b. Change tracking module - automatically records all changes applied to records in database. The primary use is for data sync facility (see next) 

c. Data Sync facility - allows to sync data between two databases. You can create a sync pack (a set of changes happened since certain date), and apply it to another database - remote included, so sync pack is transported over RESTful api.  A distinctive feature is that sync operations may be contextful - only a slice of full dataset can synced. Like you have multiple customers (as businesses with multiple users), and data for all customers is stored in one big database. Then remote database 'replicas' on customer site or on users machines would contain only customer's data. So you may setup sync operation to sync on customer's data slice, not the entire dataset.

Finally, if time allows, I may finish and push soon the following:

5. Concurrency control - providing automatic optimistic/pessimistic locking of root document records to avoid concurrent update conflicts

6. Batched updates - applying multiple updates as a single text batch. My initial measurements show that this might improve performance tenfold in most cases. 

So, that's the story. Expect all this appear soon. Thanks for staying with me, my friends!

Merry Christmas, Happy Hanukkah, Happy New Year!

Truly yours


Feb 8, 2013 at 5:22 AM
sorry for the delay, it always takes longer than it takes. it's coming, soon
Mar 7, 2013 at 1:54 PM

Do you have any estimation about the update of this project?

Best Regards
Mar 7, 2013 at 4:45 PM
Edited Mar 7, 2013 at 8:18 PM
Sorry guys, I'm late again. Let's set the deadline, that would help me to wrap it up promptly. Let's say 10 days - Sunday, March 17, rain or shine, I'm pushing the update. It's like never ending zombie movie - as soon as you think you're done, suddenly another zombie (ugly code piece) shows up. Trying to fix/kill the ugliest spots and workarounds, and it never ends - you know how it is. One good thing happened recently - for certain reasons, I had to rush with Database-first approach and built a reverse-eng tool that generates entity model (c#) from existing database. This will be in the coming update.
thank you for caring, it's coming!
Mar 18, 2013 at 7:23 AM
Done. sorry, was 20 minutes late :)
Updated zip on Downloads page, will push sources to repo later.
Web functionality (WCF-based) is deprecated, no direct Web stuff in this version. Plan to reimplement on WebApi.
Feedback is welcome!
Mar 18, 2013 at 2:23 PM
Thank you!!