Skip to content

matan23/MTJSocketStore

Repository files navigation

MTJSocketStore

Intro

SocketStore goal is to provide a template (and later on a framework) architecture for networked application, it is a facade object that provides APIs for CRUD as well as a connected DataSource which is synced with the cloud. The example app is a real time chat powered by websockets. The facade object rely on several dependencies that can be injected to it. For now I have included concrete implementations of the clients that talks to https://layer.com servers. See #Architecture for design of the store.

Work In Progress, TODOs:

  • Error handling, no error handling right now as I have no implementations for retries atm
  • Reachability
  • Typhon for dependency injection
  • NSOperation based architecture for dependent tasks
  • Retries
  • PersistentStack is not using its argument for store and model url
  • Provide simpler APIs for creation of entities
  • Decouple network representation of entities out of NSManagedObject
  • More Tests!
  • add generics and nullable for collections
  • QoS
  • Profile and add autoreleasepools
  • CoreData merge policy + cases where a bg change from the sync server, deletes an object that is currently being edited in the UI

How to Use it?

RoadMap

Long term goal is to make it a framework so that you can just use the facade SocketStore object and let you provide only:

  • a RESTClient tailored for your server's requirements
  • a SocketClient tailored for your server's requirements
  • Entities

Current state of the Architecture

Alt text

Testing

Tests both use Mocking Style and state based tests

About

Persistance store in sync with a remote server through websockets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published